package org.red_cross_service.domain.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.Data;
import lombok.experimental.Accessors;
import org.red_cross_service.common.anno.Query;

import java.math.BigDecimal;
import java.util.Date;

@Entity
@TableName("rc_activity")
@Data
@Accessors(chain =true)
public class ActivityEntity {
    @Id
    @TableId(value = "activity_id",type = IdType.AUTO)
    @ExcelIgnore
    private Long activityId;
    @Query(type = Query.QueryType.LIKE)
    @ColumnWidth(20)
    @ExcelProperty(index = 0,value = "活动名称")
    private String activityName;
    @ColumnWidth(20)
    @ExcelIgnore
    private String activityImg;
    @ColumnWidth(20)
    @ExcelProperty(index = 3,value = "活动开始时间")
    @DateTimeFormat("yyyy年MM月dd日hh点")
    private Date activityBeginTime;
    @ColumnWidth(20)
    @DateTimeFormat("yyyy年MM月dd日hh点")
    @ExcelProperty(index = 4,value = "活动结束时间")
    private Date activityEndTime;
    @ColumnWidth(10)
    @ExcelProperty(index = 2,value = "活动参与人数")
    private Integer enrollment;
    @ExcelIgnore
    private Date createAt;
    @ExcelIgnore
    private String videosInfo;
    @ExcelIgnore
    private String trainingInfo;
    @ExcelIgnore
    private BigDecimal videosLength;
    @ColumnWidth(20)
    @ExcelProperty(index = 1,value = "主办方")
    private String organizer;
    @ExcelIgnore
    private String trainingContent;

}
